from openpyxl import load_workbook


class ReadExcel:
    @staticmethod
    def get_excel_data(excel_name, sheet_name):
        wb = load_workbook(f"./ReadExcel/{excel_name}.xlsx")
        ws = wb[sheet_name]

        data = []
        # 假设 Excel 数据从第二行开始，第一行是标题
        for row in ws.iter_rows(min_row=2, values_only=True):
            data.append(row)  # 将每一行作为元组加入到 data 列表
        return data
